<?php  
        session_start();
		require_once ("../Model/mysql.php");
		require_once ('../host_config.php');
		if (!isset($_SESSION['shopid']) && isset($_SESSION['flag'])) {
            echo "<script language='javascript'>";
            echo "alert('You have no permission to read this page!');";
            echo "history.back();";
            echo "</script>";
            header("location:../login.php");
        }else if($_SESSION['flag'] == "2") {
            	     
        }else if($_SESSION['shopid'] != $_GET['id']) {
        	header("location:select.php?id=".$_SESSION['shopid']);
        }
        	$shopid = $_GET['id'];
        
        	$mysql = new MySQL();
        	$link = $mysql->connect($mysql_host, $mysql_user, $mysql_passwd, $mysql_db);
			
			$shopid = mysql_real_escape_string($shopid);
        	$sql = "SELECT `fullname` FROM `Shops` WHERE `shopid` = '$shopid'";
        	$str = $mysql->query_row($sql, $link);
        	/*
        	$sql = "SELECT id FROM login_user WHERE all_name = '$str[0]'";
        	$str2 = $mysql->query_row($sql, $link);
        	$u_id = $str2[0];
        	*/
           
?>
<!DOCTYPE html>
<html>

<head>
	<meta name="viewport" content="width=device-width; text/html; charset=utf-8" http-equiv="Content-Type">
	<title>餐廳資訊填寫</title>
	<link href="../mobile.css" rel="stylesheet" type="text/css">
	<style type="text/css">
		.auto-style1 {
			color: #FF0000;
		}
	</style>
</head>
<body>
	<div id="banner">訂位資訊
		<div id="home">
        	<a href="select.php?id=<?php echo $shopid;?>">
            <img alt="" class="auto-style1" height="40" src="../pic/home.png" width="40"></a>
        </div>
		<div id="logout">
			<a href="../logout.php">
			<img alt="" class="auto-style1" height="41" src="../pic/logout.png" width="41"></a>
		</div>
	</div>
	<div id="content">
		<form method="post" action="new_checkin.php?id=<?php echo $shopid;?>" name="myForm">
			<br/>
			<div id="button_z">客戶姓氏與性別</div>
			<p><input type="text" name="clientName" size="15" id="ttex"></p>
			<div id="button_z">訂位人數</div>
			<p><input type="text" name="orderNumber" size="15" id="ttex"></p>
			<div id="button_z">電話</div>
			<p><input type="text" name="clientPhone" size="15" id="ttex"></p>
			<p><input type="submit" value="下一頁">&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset"></p>		
			<hr>
			<br/>		
		</form>
	</div>
</body>
</html>
